<!doctype html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>智能闹钟</title>
	 <meta http-equiv="refresh" content="2000"> 
	<link rel="stylesheet" type="text/css" href="css/default.css">
	<link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/highlight.css" rel="stylesheet">
    <link href="css/bootstrap-switch.css" rel="stylesheet">
    <link href="css/docs.min.css" rel="stylesheet">
    <link href="css/font.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">
    <style type="text/css">
    	body{font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif; overflow:hidden;
  }
		.bs-docs-header h1{
			font-size: 1.5em;
			font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif;
		}
		.bs-docs-header h1 span{
			display: block;
			font-size: 60%;
			font-weight: 400;
			padding: 0.8em 0 0.5em 0;
			color: #c3c8cd;
		}
		.htmleaf-icon{color: #fff;}
		.container{
		    text-align: center;
		}
		#n_time{
		    font-size:2.1em;
		}
		#n_data{
		    font-size:0.8em;
		}
		.show_msg{
		    text-align: left;
		}
		.show_tq{
		     width:100%;
		     height:120px; 
		}
		#log_window {
            width:100%;
            height:100%;
            background-color:#000;
            position:absolute;
            top:0;
            left:0;
            z-index:2;
            opacity:0.01;
            /*兼容IE8及以下版本浏览器*/
            filter: alpha(opacity=30);
            display:;
            }
    </style>
    	<script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/highlight.js"></script>
    <script src="js/bootstrap-switch.js"></script>
    <script src="js/main.js"></script>
    
    <script>
        $(document).ready(function(){
         updateredmine();
         setInterval(function(){currentTime()},1000);
         setInterval(function(){updateredmine()},20000);
         
        });
        
        function currentTime(){
                    var d = new Date(),str = '';
                    var weekArray = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
                    var week = weekArray[d.getDay()];
                    var m=d.getMonth() + 1;
                    var dd= d.getDate();
                    var hh=d.getHours();
                    var mm=d.getMinutes();
                    var ss= d.getSeconds();
                    
                    if(m<10) m="0"+m;
                    if(dd<10) dd="0"+dd;
                    if(hh<10) hh="0"+hh;
                    if(mm<10) mm="0"+mm;
                    if(ss<10) ss="0"+ss;
                     
                    
                     str += d.getFullYear()+'-';
                     str  += m+'-';
                     str  += dd+'';
                     
                     if(ss%2==0) fstr=":";else fstr=" ";
                      $('#n_data').html(str +" "+week);
                      str = '';
                     str = hh+fstr; 
                     str+= mm+fstr; 
                    str+=ss+''; 
                    $('#n_time').html(str);
                    return str;
                    }

        function updateredmine()
        {
           
             $.get("data.php?t=list",successCallback);
        
        
             $.get("nowdata.php",function(data){
                
                $("#n_set_data").html(data);
              
            });
        }
        function successCallback(data) {
            data=eval("("+data+")");
                $(".show_msg").html("");
              $.each(data,function(index,d){  
                   var title=d.title;
                  $(".show_msg").append("<li>["+d.deadline+"]"+ title+"["+(d.isok==1?"已完成":"进行中")+"]</li>");
                         
                     });   
        }

    </script>
    
</head>
<body>
  <div id="log_window"></div>
  <div class="container" style=" overflow:hidden">
    <div class="row">
        <table class="table table-condensed">
                <tr>
                  <td style="width:45%"> 
                      <h2><span id="n_time"></span></h2>
                      <h2><span id="n_data"></span></h2>
                      <h6><span id="n_set_data"></span></h6>
                  </td>
                  <td >
                  <h4><a target="_blank" href="todo.html">今日任务</a></h4>
                  <ol class="show_msg">
                      <li>1</li>
                      <li>1</li>
                      <li>1</li>
                      <li>1</li>
                  </ol>
                  </td>
                </tr>
               
              
               <tr>
                  <td colspan="2" >
                      <iframe class="show_tq" src="http://i.tianqi.com/index.php?c=code&id=19&color=%23&icon=3&temp=1&num=5&site=12" frameborder="0" scrolling="no" width="500" height="110" allowTransparency="true"></iframe>
                    </td>
                       
                </tr>
        </table>
    </div>
  </div>
</body>
</html>

 